From: awilliam@xenbuild.aw Date: Mon, 15 May 2006 16:53:23 +0000 (-0600) Subject: [IA64] move evtchn_vector to shared_info X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16068 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=0b5ba3777d8b233aec7d260dd5af550a48ec91d4;p=xen.git [IA64] move evtchn_vector to shared_info Move evtchn_vector from vcpu_info to shared_info. Signed-off-by: Tristan Gingold --- diff --git a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c index 1e7df722d0..08cb9be336 100644 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/evtchn_ia64.c @@ -246,25 +246,14 @@ static struct irqaction evtchn_irqaction = { .name = "xen-event-channel" }; -int evtchn_irq = 0xe9; +static int evtchn_irq = 0xe9; void __init evtchn_init(void) { shared_info_t *s = HYPERVISOR_shared_info; - vcpu_info_t *vcpu_info = &s->vcpu_info[smp_processor_id()]; -#if 0 - int ret; - irq = assign_irq_vector(AUTO_ASSIGN); - ret = request_irq(irq, evtchn_interrupt, 0, "xen-event-channel", NULL); - if (ret < 0) - { - printk("xen-event-channel unable to get irq %d (%d)\n", irq, ret); - return; - } -#endif register_percpu_irq(evtchn_irq, &evtchn_irqaction); - vcpu_info->arch.evtchn_vector = evtchn_irq; + s->arch.evtchn_vector = evtchn_irq; printk("xen-event-channel using irq %d\n", evtchn_irq); spin_lock_init(&irq_mapping_update_lock); diff --git a/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S b/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S index 7075f445ed..f675a8441c 100644 --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypercall.S @@ -247,7 +247,7 @@ GLOBAL_ENTRY(xen_set_kr) XEN_RESTORE_PSR_IC ;; br.ret.sptk.many rp -END(xen_set_rr) +END(xen_set_kr) GLOBAL_ENTRY(xen_fc) movl r8=running_on_xen;; diff --git a/tools/libxc/xc_ia64_stubs.c b/tools/libxc/xc_ia64_stubs.c index a65dd5afb9..97da325f03 100644 --- a/tools/libxc/xc_ia64_stubs.c +++ b/tools/libxc/xc_ia64_stubs.c @@ -723,7 +723,7 @@ int xc_hvm_build(int xc_handle, ctxt->flags = VGCF_VMX_GUEST; ctxt->regs.cr_iip = 0x80000000ffffffb0UL; - ctxt->vcpu.privregs = 0; + ctxt->privregs = 0; memset( &launch_op, 0, sizeof(launch_op) ); diff --git a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c index 4c0d655855..47cb7950dd 100644 --- a/tools/libxc/xc_linux_build.c +++ b/tools/libxc/xc_linux_build.c @@ -1114,7 +1114,7 @@ static int xc_linux_build_internal(int xc_handle, ctxt->regs.ar_fpsr = xc_ia64_fpsr_default(); /* currently done by hypervisor, should move here */ /* ctxt->regs.r28 = dom_fw_setup(); */ - ctxt->vcpu.privregs = 0; + ctxt->privregs = 0; ctxt->sys_pgnr = 3; i = 0; /* silence unused variable warning */ #else /* x86 */ diff --git a/xen/arch/ia64/xen/domain.c b/xen/arch/ia64/xen/domain.c index 11cac65714..032e825140 100644 --- a/xen/arch/ia64/xen/domain.c +++ b/xen/arch/ia64/xen/domain.c @@ -269,11 +269,7 @@ fail_nomem: void arch_getdomaininfo_ctxt(struct vcpu *v, struct vcpu_guest_context *c) { - struct pt_regs *regs = vcpu_regs (v); - - c->regs = *regs; - c->vcpu.evtchn_vector = v->vcpu_info->arch.evtchn_vector; - + c->regs = *vcpu_regs (v); c->shared = v->domain->shared_info->arch; } @@ -312,11 +308,10 @@ int arch_set_info_guest(struct vcpu *v, struct vcpu_guest_context *c) } new_thread(v, regs->cr_iip, 0, 0); - v->vcpu_info->arch.evtchn_vector = c->vcpu.evtchn_vector; - if ( c->vcpu.privregs && copy_from_user(v->arch.privregs, - c->vcpu.privregs, sizeof(mapped_regs_t))) { + if ( c->privregs && copy_from_user(v->arch.privregs, + c->privregs, sizeof(mapped_regs_t))) { printk("Bad ctxt address in arch_set_info_guest: %p\n", - c->vcpu.privregs); + c->privregs); return -EFAULT; } diff --git a/xen/arch/ia64/xen/hypercall.c b/xen/arch/ia64/xen/hypercall.c index d1875f275a..56c410f8bf 100644 --- a/xen/arch/ia64/xen/hypercall.c +++ b/xen/arch/ia64/xen/hypercall.c @@ -153,9 +153,6 @@ fw_hypercall_ipi (struct pt_regs *regs) c.regs.cr_iip = targ_regs->cr_iip; c.regs.r1 = targ_regs->r1; - /* Copy from vcpu 0. */ - c.vcpu.evtchn_vector = - current->domain->vcpu[0]->vcpu_info->arch.evtchn_vector; if (arch_set_info_guest (targ, &c) != 0) { printf ("arch_boot_vcpu: failure\n"); return; diff --git a/xen/arch/ia64/xen/vcpu.c b/xen/arch/ia64/xen/vcpu.c index 9052010444..0ad69f9de9 100644 --- a/xen/arch/ia64/xen/vcpu.c +++ b/xen/arch/ia64/xen/vcpu.c @@ -682,9 +682,9 @@ UINT64 vcpu_check_pending_interrupts(VCPU *vcpu) */ check_start: if (event_pending(vcpu) && - !test_bit(vcpu->vcpu_info->arch.evtchn_vector, + !test_bit(vcpu->domain->shared_info->arch.evtchn_vector, &PSCBX(vcpu, insvc[0]))) - vcpu_pend_interrupt(vcpu, vcpu->vcpu_info->arch.evtchn_vector); + vcpu_pend_interrupt(vcpu, vcpu->domain->shared_info->arch.evtchn_vector); p = &PSCBX(vcpu,irr[3]); r = &PSCBX(vcpu,insvc[3]); diff --git a/xen/include/asm-ia64/event.h b/xen/include/asm-ia64/event.h index 32afe39795..31bd169e59 100644 --- a/xen/include/asm-ia64/event.h +++ b/xen/include/asm-ia64/event.h @@ -29,7 +29,7 @@ static inline void evtchn_notify(struct vcpu *v) smp_send_event_check_cpu(v->processor); if(!VMX_DOMAIN(v)) - vcpu_pend_interrupt(v, v->vcpu_info->arch.evtchn_vector); + vcpu_pend_interrupt(v, v->domain->shared_info->arch.evtchn_vector); } /* Note: Bitwise operations result in fast code with no branches. */ diff --git a/xen/include/public/arch-ia64.h b/xen/include/public/arch-ia64.h index 36f161abfe..19716fe79b 100644 --- a/xen/include/public/arch-ia64.h +++ b/xen/include/public/arch-ia64.h @@ -293,8 +293,6 @@ typedef struct { } mapped_regs_t; typedef struct { - mapped_regs_t *privregs; - int evtchn_vector; } arch_vcpu_info_t; typedef mapped_regs_t vpd_t; @@ -302,6 +300,9 @@ typedef mapped_regs_t vpd_t; typedef struct { unsigned int flags; unsigned long start_info_pfn; + + /* Interrupt vector for event channel. */ + int evtchn_vector; } arch_shared_info_t; typedef struct { @@ -321,7 +322,7 @@ typedef struct vcpu_guest_context { unsigned long vm_assist; /* VMASST_TYPE_* bitmap, now none on IPF */ cpu_user_regs_t regs; - arch_vcpu_info_t vcpu; + mapped_regs_t *privregs; arch_shared_info_t shared; arch_initrd_info_t initrd; char cmdline[IA64_COMMAND_LINE_SIZE];